<?php
include($_SERVER["DOCUMENT_ROOT"]."/db.inc.php");


$arrSQL1[0] = "INSERT INTO `bet_BetList` (`ID`, `LottoID`, `Bet_Type`, `GambleID`, `Number`, `OddsID`, `OddsID2`, `Odds`, `Odds2`, `MemID`, `MemExchangeRate`, `MemCurrency`, `MemStake`, `MemPayOff`, `MemResult`, `MemCommission`, `SubID`, `SubIncome`, `SubCommission`, `SubResult`, `SubRate`, `SubRateResult`, `MainID`, `MainCommission`, `MainResult`, `MainRate`, `MainRateResult`, `StockID`, `StockCommission`, `StockResult`, `StockRate`, `StockRateResult`, `PayupDate`, `isPayOff`, `WagerType`) VALUES ({GID}, 1, 7, 210, 0, 23871, 0, '520', '0', 5, '4.76', 3, 2520, '1.30788e+06', '0', '0', 4, '0', '0.13', '0', '0.8', '0', 3, '0.13', '0', '0.6', '0', 2, '0.15', '0', '0.2', '0', '2005-03-25', 0, 0);";

$arrSQL1[1] = "INSERT INTO `bet_BetList` (`ID`, `LottoID`, `Bet_Type`, `GambleID`, `Number`, `OddsID`, `OddsID2`, `Odds`, `Odds2`, `MemID`, `MemExchangeRate`, `MemCurrency`, `MemStake`, `MemPayOff`, `MemResult`, `MemCommission`, `SubID`, `SubIncome`, `SubCommission`, `SubResult`, `SubRate`, `SubRateResult`, `MainID`, `MainCommission`, `MainResult`, `MainRate`, `MainRateResult`, `StockID`, `StockCommission`, `StockResult`, `StockRate`, `StockRateResult`, `PayupDate`, `isPayOff`, `WagerType`) VALUES ({GID}, 1, 8, 210, 0, 23873, 23872, '20', '80', 5, '4.76', 3, 2520, '47880', '0', '0', 4, '0', '0.13', '0', '0.8', '0', 3, '0.13', '0', '0.6', '0', 2, '0.15', '0', '0.2', '0', '2005-03-25', 0, 0);";

$arrSQL1[2] = "INSERT INTO `bet_BetList` (`ID`, `LottoID`, `Bet_Type`, `GambleID`, `Number`, `OddsID`, `OddsID2`, `Odds`, `Odds2`, `MemID`, `MemExchangeRate`, `MemCurrency`, `MemStake`, `MemPayOff`, `MemResult`, `MemCommission`, `SubID`, `SubIncome`, `SubCommission`, `SubResult`, `SubRate`, `SubRateResult`, `MainID`, `MainCommission`, `MainResult`, `MainRate`, `MainRateResult`, `StockID`, `StockCommission`, `StockResult`, `StockRate`, `StockRateResult`, `PayupDate`, `isPayOff`, `WagerType`) VALUES ({GID}, 1, 9, 210, 0, 23874, 0, '60', '0', 5, '4.76', 3, 945, '55755', '0', '0', 4, '0', '0.13', '0', '0.8', '0', 3, '0.13', '0', '0.6', '0', 2, '0.15', '0', '0.2', '0', '2005-03-25', 0, 0);";

$arrSQL1[3] = "INSERT INTO `bet_BetList` (`ID`, `LottoID`, `Bet_Type`, `GambleID`, `Number`, `OddsID`, `OddsID2`, `Odds`, `Odds2`, `MemID`, `MemExchangeRate`, `MemCurrency`, `MemStake`, `MemPayOff`, `MemResult`, `MemCommission`, `SubID`, `SubIncome`, `SubCommission`, `SubResult`, `SubRate`, `SubRateResult`, `MainID`, `MainCommission`, `MainResult`, `MainRate`, `MainRateResult`, `StockID`, `StockCommission`, `StockResult`, `StockRate`, `StockRateResult`, `PayupDate`, `isPayOff`, `WagerType`) VALUES ({GID}, 1, 10, 210, 0, 23876, 23875, '60', '30', 5, '4.76', 3, 945, '55755', '0', '0', 4, '0', '0.13', '0', '0.8', '0', 3, '0.13', '0', '0.6', '0', 2, '0.15', '0', '0.2', '0', '2005-03-25', 0, 0);";

$arrSQL1[4] = "INSERT INTO `bet_BetList` (`ID`, `LottoID`, `Bet_Type`, `GambleID`, `Number`, `OddsID`, `OddsID2`, `Odds`, `Odds2`, `MemID`, `MemExchangeRate`, `MemCurrency`, `MemStake`, `MemPayOff`, `MemResult`, `MemCommission`, `SubID`, `SubIncome`, `SubCommission`, `SubResult`, `SubRate`, `SubRateResult`, `MainID`, `MainCommission`, `MainResult`, `MainRate`, `MainRateResult`, `StockID`, `StockCommission`, `StockResult`, `StockRate`, `StockRateResult`, `PayupDate`, `isPayOff`, `WagerType`) VALUES ({GID}, 1, 11, 210, 0, 23877, 0, '120', '0', 5, '4.76', 3, 756, '89964', '0', '0', 4, '0', '0.13', '0', '0.8', '0', 3, '0.13', '0', '0.6', '0', 2, '0.13', '0', '0.2', '0', '2005-03-25', 0, 0);";
    

$arrSQL2[0] = "INSERT INTO `bet_BetListContent` (`ID`, `GameDate`, `BetDate`, `BetTime`, `Content`, `checkkey`, `GambleType`, `MemAccount`, `isBlack`, `NNWin`, `NSWin`, `JoinNumber`, `OneStake`) VALUES ('', '2005-03-25', '2005-03-25', '18:09:33', '<span class=\"wager_color_blue\">{Show-GameNo-Name} <b>117</b></span><br /><span class=\"wager_color_red\">{Show-JoinNumber-Name} --&nbsp;{Show-Bet_Type7-Name}</span>@<span class=\"wager_color_red\">520</span><br />{Show-MultiItems-Name}[&nbsp;<span class=\"wager_joinno_color\">120</span>&nbsp;]&nbsp;{Show-Items-Name}<br /><span class=\"wager_join_color\">01.02.03.04.05.06.07.08.09.10</span>', '{CheckKey}', 1, 'testMA', 0, 0, 0, '01,02,03,04,05,06,07,08,09,10', 21);";

$arrSQL2[1] = "INSERT INTO `bet_BetListContent` (`ID`, `GameDate`, `BetDate`, `BetTime`, `Content`, `checkkey`, `GambleType`, `MemAccount`, `isBlack`, `NNWin`, `NSWin`, `JoinNumber`, `OneStake`) VALUES ('', '2005-03-25', '2005-03-25', '18:09:51', '<span class=\"wager_color_blue\">{Show-GameNo-Name} <b>117</b></span><br /><span class=\"wager_color_red\">{Show-JoinNumber-Name} --&nbsp;{Show-WinTwo-Name}</span>@<span class=\"wager_color_red\">20</span><span class=\"wager_color_red\">&nbsp;,&nbsp;{Show-WinThree-Name}</span>@<span class=\"wager_color_red\">80</span><br />{Show-MultiItems-Name}[&nbsp;<span class=\"wager_joinno_color\">120</span>&nbsp;]&nbsp;{Show-Items-Name}<br /><span class=\"wager_join_color\">11.12.13.14.15.16.17.18.19.20</span>', '{CheckKey}', 1, 'testMA', 0, 0, 0, '11,12,13,14,15,16,17,18,19,20', 21);";

$arrSQL2[2] = "INSERT INTO `bet_BetListContent` (`ID`, `GameDate`, `BetDate`, `BetTime`, `Content`, `checkkey`, `GambleType`, `MemAccount`, `isBlack`, `NNWin`, `NSWin`, `JoinNumber`, `OneStake`) VALUES ('', '2005-03-25', '2005-03-25', '18:10:07', '<span class=\"wager_color_blue\">{Show-GameNo-Name} <b>117</b></span><br /><span class=\"wager_color_red\">{Show-JoinNumber-Name} --&nbsp;{Show-Bet_Type9-Name}</span>@<span class=\"wager_color_red\">60</span><br />{Show-MultiItems-Name}[&nbsp;<span class=\"wager_joinno_color\">45</span>&nbsp;]&nbsp;{Show-Items-Name}<br /><span class=\"wager_join_color\">21.22.23.24.25.26.27.28.29.30</span>', '{CheckKey}', 1, 'testMA', 0, 0, 0, '21,22,23,24,25,26,27,28,29,30', 21);";

$arrSQL2[3] = "INSERT INTO `bet_BetListContent` (`ID`, `GameDate`, `BetDate`, `BetTime`, `Content`, `checkkey`, `GambleType`, `MemAccount`, `isBlack`, `NNWin`, `NSWin`, `JoinNumber`, `OneStake`) VALUES ('', '2005-03-25', '2005-03-25', '18:10:25', '<span class=\"wager_color_blue\">{Show-GameNo-Name} <b>117</b></span><br /><span class=\"wager_color_red\">{Show-JoinNumber-Name} --&nbsp;{Show-WinSpecial-Name}</span>@<span class=\"wager_color_red\">60</span><span class=\"wager_color_red\">&nbsp;,&nbsp;{Show-WinTwo-Name}</span>@<span class=\"wager_color_red\">30</span><br />{Show-MultiItems-Name}[&nbsp;<span class=\"wager_joinno_color\">45</span>&nbsp;]&nbsp;{Show-Items-Name}<br /><span class=\"wager_join_color\">31.32.33.34.35.36.37.38.39.40</span>', '{CheckKey}', 1, 'testMA', 0, 0, 0, '31,32,33,34,35,36,37,38,39,40', 21);";

$arrSQL2[4] = "INSERT INTO `bet_BetListContent` (`ID`, `GameDate`, `BetDate`, `BetTime`, `Content`, `checkkey`, `GambleType`, `MemAccount`, `isBlack`, `NNWin`, `NSWin`, `JoinNumber`, `OneStake`) VALUES ('', '2005-03-25', '2005-03-25', '18:10:41', '<span class=\"wager_color_blue\">{Show-GameNo-Name} <b>117</b></span><br /><span class=\"wager_color_red\">{Show-JoinNumber-Name} --&nbsp;{Show-Bet_Type11-Name}</span>@<span class=\"wager_color_red\">120</span><br />{Show-MultiItems-Name}[&nbsp;<span class=\"wager_joinno_color\">36</span>&nbsp;]&nbsp;{Show-Items-Name}<br /><span class=\"wager_join_color\">41.42.43.44.45.46.47.48.49</span>', '{CheckKey}', 1, 'testMA', 0, 0, 0, '41,42,43,44,45,46,47,48,49', 21);";

for($i = 0; $i < 100000; $i++){
	$strCheckKey = (string)($i + 1111859838);
	for($j = 0; $j < 5; $j++){
		print $i."-".$j.", ";
		$strCheckKey1 = $strCheckKey."-".(string)(17349201 + $j);
		print $strCheckKey1."Q";
		$strSQL = str_replace("{CheckKey}", $strCheckKey1, $arrSQL2[$j]);
		if(!PMA_mysql_query($strSQL, $_ConnMaster)){
			$GLOBALS["errormessage"] = "Join Number Calculate Wager Error!!";
			$GLOBALS["errorhidden"] = "Error: ".PMA_mysql_error($_ConnMaster)."\nSQL:".$strSQL."\nLine:".__LINE__."\nPage:".__FILE__;
			print $GLOBALS["errorhidden"];
			exit();
		}
		$GID = mysql_insert_id();
		$strSQL = str_replace("{GID}", $GID, $arrSQL1[$j]);
		if(!PMA_mysql_query($strSQL, $_ConnMaster)){
			$GLOBALS["errormessage"] = "Join Number Calculate Wager Error!!";
			$GLOBALS["errorhidden"] = "Error: ".PMA_mysql_error($_ConnMaster)."\nSQL:".$strSQL."\nLine:".__LINE__."\nPage:".__FILE__;
			print $GLOBALS["errorhidden"];
			exit();
		}
	}
	print "<br>\n";
	flush();
}
?>OK!